home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Collections: Topik
/
Topik - Disk 36 - Archivers (19xx)(Topik Public Domain)(PD)[WB].zip
/
Topik - Disk 36 - Archivers (19xx)(Topik Public Domain)(PD)[WB].adf
/
Zoo
/
zall
/
zall.doc
< prev
next >
Wrap
Text File
|
1990-10-07
|
6KB
|
125 lines
*** Topik Note : Visible only from the CLI in this directory are the files:
allfiles - for displaying a files from a directory through subdirectories,
ltypes.i - Macros for use in the allfiles.asm, zallpipe and zalltemp - two
script files for using allfiles to your advantage with zoo.
ZAll / AllFiles
© 1989, by Mike Cargal
This program is freely redistributable.
(NOTE: Requires ARP 1.1 or higher)
Well, this is it, my second contribution to the world of Amiga freely
redistributable software. Let me know how you like it. You may leave
messages in the Amiga Sig of either of the following two boards. I sign
on to them fairly regularly, and would therefore be likely to get your
message. C.I.A (404-561-5359) and the Columbus Connection (404-687-7309),
or on BIX to mcargal.
What are ZAll and AllFiles?
ZAll is a script file to be used in conjunction with AllFiles and
ZOO, to easily zoo down an entire directory structure, so that it can be
recreated when unzooed. AllFiles simply lists all the files in a
directory and it's sub-directories to stdout. These names are relative
to your current directory. It can be used to send a list of files to
zoo.
Note: There are two versions of ZAll included: zalltemp which uses
an intermediate file on the t: device, and zallpipe which uses the PIP:
device from conman 1.3. If you don't have this device you will want to use
zalltemp (just rename it as zall). If you have the PIP: device you may
wish to try zallpipe (rename it as zall). In testing this, it seems that
it may actually be slower than using the temporary file since AllFiles and
ZOO are in contention with each other when usong PIP: (causing disk
thrashing). Experiment to decide which you prefer.
How do I use ZAll?
I set the S protection bit on all my executable files so they can
be executed without typing execute in front of them on the CLI. I
also include the following line in my Shell-Startup:
ALIAS SBit PROTECT [] S ADD
This way I can type SBit <batch file name> and easily reset this
protection bit. (My text editor has the nasty habit of resetting this
bit whenever I save the file down.)
ZAll calls for a zoo file name and an optional list of directories
to be zooed down.
ZAll zf dir1 dir2 dir3 dir4 dir5 (you can change tthe batch file
if you need more directories
and AllFiles will handle the
additional args)
zf - the name of the zoo file you wish to have created
dirx - optional directory names (none indicates your current
directory.)
That's it, just be sure to use the e// command to unzoo (this recreates
directory structures).
*HINT*
I spent quite a while trying to get this script file to work because
I had left out the .BRA and .KET directives. If you don't change them,
AmigaDos goes bonkers when you try to do input redirection. It seems
that it can tell the '<' for input redirection from the '<' to bracket
keyword substitution in script files. A brilliant conflict of syntax
on Commodore's part. So, the hint -- if you're going to use input
redirection in a script file, you have to change the .BRA character,
and it makes sense to make the .KET be a logical match, even though
you would not technically need to change it.
How do I use AllFiles?
AllFlies takes an optional list of directories and lists them to
stout. If you don't specify a directory(s), your current directory and
sub-directories will be listed. Files are listed with pathnames needed
to access them from your current directory. *NOTE* I do not list full
pathnames, since you may not want to recreate full paths when you unzoo.
By CD'ing to the right location you can create a list of files to create
any directory structure you may have. AllFiles uses the ARP multiargs
option so that you can specify several directories at on time.
For Programmers:
I have included the assembler source to this program. I am using
Asm68K by W. W. Howe (you can be productive without commercial assemblers/
compilers, through it might be easier if I spent a few dollars on the
commercial packages). I have since switched to CAPE and recommend it
highly. I would also recommend Exterminator by Glen Marriman
which I used to help debug this program (but don't blame him if all the
bugs aren't eradicated). And (while I'm giving credit) I especially want
to thank the folks at ARP for providing a host of useful subroutines for
coding a small, but still user-friendly program.
If you are like me, you want to know what things a program does
to determine if it might have example code to use rather than have to
experiment with trial and error attempts to get function calls working
like they should. With that in mind, these are some of the things that
AllFiles provides examples of:
1) ARP GADS function call to parse command line (including multiargs)
2) coding reentrant programs to be made resident
3) Using LINK and UNLK instructions with a local structure on the
stack to create recursive subroutines in assembler (now that's
a real mouthfull, just look at the subroutine ListDir)
4) I've included an include file you'll need to assmeble this. It's
called Ltypes.i, it is very similar to the exec/types.i file,
except that it creates negative offset structures, suitable for
use with LINK and UNLK.
*** NOTE ***
This program makes extensive use of arp.library version 1.1. In order
to use this program version 1.1 of arp.library should be placed in your
LIBS: directory. Since ARP is easy to find, and it would only increase
the size of this upload module unnecessarily for those of you already
having ARP, I have not included it here.
Let me know how you like (or dislike) it.
Later... Mike
P.S. There are other uses for AllFiles. I know of someone who has set up
an alias using AllFiles, Search, and Sort (with pipes) to implement a
WhereIs command, so play with it and let me know what you come up with.